package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum PressionParamType {

    DB(0 , "仓库的库" ),
    TABLE(1 , "表级别" ),
    CULONM(2 , "字段级别" ),
    ROW(3 , "行规则" ),
    ENSTYPE(4 , "加密方式" );
    private  int id;
    private  String  name;
    PressionParamType(int id , String  name){
        this.id = id;
        this.name = name;
    }

    public static PressionParamType ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (PressionParamType s : PressionParamType.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
